#ifndef SKILL_H
#define SKILL_H


#include "dtwentyitem.h"


class Skill : public DTwentyItem
{
    Q_OBJECT

    Q_PROPERTY(int attribute READ attribute WRITE setAttribute)

    class Data : public QSharedData
    {
    public:
        Data() {}
        Data(const Data& other) : QSharedData(other)
        {
            attribute = other.attribute;
        }

        QVariant attribute;
    };


public:

    Q_INVOKABLE Skill(const QString& name = QString(), QObject* parent = 0);
    Skill(int attribute, const QString& name, QObject* parent = 0); // we don't want to invoke this
    Skill(const Skill& other);

    int attribute() const;
    void setAttribute(int attribute);


private:

    QExplicitlySharedDataPointer<Data> d;


};

Q_DECLARE_METATYPE(Skill)


typedef DTwentyItemContainer<Skill> SkillContainer;

Q_DECLARE_METATYPE(SkillContainer)


#endif // SKILL_H
